package router

import (
	"awesomeProject/order-web/api/shopCart"
	"awesomeProject/order-web/middlewares"
	"github.com/gin-gonic/gin"
)

func InitShopCartRouter(Router *gin.RouterGroup) {
	ShopCartRouter := Router.Group("shopcarts").Use(middlewares.Trace())
	{

		ShopCartRouter.GET("", middlewares.JWTAuth(), shopCart.List)
		ShopCartRouter.DELETE("/:id", middlewares.JWTAuth(), shopCart.Delete)
		ShopCartRouter.POST("", middlewares.JWTAuth(), shopCart.New)
		ShopCartRouter.PATCH("/:id", middlewares.JWTAuth(), shopCart.Update)
	}
}
